package com.sfj.system.enums;

/**
 * @author kaka
 * @Date 2025/08/26
 */
public enum MockUserEnum {
    USER_001("001", "张一级", "001"),
    USER_ADMIN("000", "admin", "111"),
    USER_002("002", "张二级", "002"),
    USER_003("003", "张三级", "003"),
    USER_004("004", "张四级", "004"),
    USER_005("005", "张五级", "005"),
    USER_006("006", "张六级", "006"),
    USER_007("007", "张七级", "007"),

    USER_TEST("7758258", "admin", "admin");

    private final String code;
    private final String userName;
    private final String loginName;

    MockUserEnum(String code, String userName, String loginName) {
        this.code = code;
        this.userName = userName;
        this.loginName = loginName;
    }

    public String getCode() {
        return code;
    }

    public String getUserName() {
        return userName;
    }

    public String getLoginName() {
        return loginName;
    }

    public static MockUserEnum fromCode(String code) {
        for (MockUserEnum user : values()) {
            if (user.code.equals(code)) {
                return user;
            }
        }
        return null;
    }
}

